/**
 * @projectName: com.xiayuanxing.designPattern
 * @className: DVDPlayer
 * @author: xiayuanxing
 * @description: TODO
 * @date: 2021/12/28 16:04
 * @version: 1.0
 */
public class DVDPlayer {

    //单例模式  饿汉式

    private static DVDPlayer instance = new DVDPlayer();

    public static DVDPlayer getInstance(){
        return instance;
    }


    public void on(){
        System.out.println("dvd on!");
    }

    public void  off(){
        System.out.println("dvd off!");
    }


    public void play(){
        System.out.println("dvd is playing!");
    }

    public void pause(){
        System.out.println("dvd pause...");
    }
}
